/* Generated by ./src/xlat/gen.sh from ./src/xlat/xdp_sockaddr_flags.in; do not edit. */

#include "gcc_compat.h"
#include "static_assert.h"

#if defined(XDP_SHARED_UMEM) || (defined(HAVE_DECL_XDP_SHARED_UMEM) && HAVE_DECL_XDP_SHARED_UMEM)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((XDP_SHARED_UMEM) == ((1 << 0)), "XDP_SHARED_UMEM != (1 << 0)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define XDP_SHARED_UMEM (1 << 0)
#endif
#if defined(XDP_COPY) || (defined(HAVE_DECL_XDP_COPY) && HAVE_DECL_XDP_COPY)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((XDP_COPY) == ((1 << 1)), "XDP_COPY != (1 << 1)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define XDP_COPY (1 << 1)
#endif
#if defined(XDP_ZEROCOPY) || (defined(HAVE_DECL_XDP_ZEROCOPY) && HAVE_DECL_XDP_ZEROCOPY)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((XDP_ZEROCOPY) == ((1 << 2)), "XDP_ZEROCOPY != (1 << 2)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define XDP_ZEROCOPY (1 << 2)
#endif
#if defined(XDP_USE_NEED_WAKEUP) || (defined(HAVE_DECL_XDP_USE_NEED_WAKEUP) && HAVE_DECL_XDP_USE_NEED_WAKEUP)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((XDP_USE_NEED_WAKEUP) == ((1 << 3)), "XDP_USE_NEED_WAKEUP != (1 << 3)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define XDP_USE_NEED_WAKEUP (1 << 3)
#endif
#undef XLAT_PREV_VAL

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat xdp_sockaddr_flags in mpers mode

# else

DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
static const struct xlat_data xdp_sockaddr_flags_xdata[] = {
 XLAT(XDP_SHARED_UMEM),
 #define XLAT_VAL_0 ((unsigned) (XDP_SHARED_UMEM))
 #define XLAT_STR_0 STRINGIFY(XDP_SHARED_UMEM)
 XLAT(XDP_COPY),
 #define XLAT_VAL_1 ((unsigned) (XDP_COPY))
 #define XLAT_STR_1 STRINGIFY(XDP_COPY)
 XLAT(XDP_ZEROCOPY),
 #define XLAT_VAL_2 ((unsigned) (XDP_ZEROCOPY))
 #define XLAT_STR_2 STRINGIFY(XDP_ZEROCOPY)
 XLAT(XDP_USE_NEED_WAKEUP),
 #define XLAT_VAL_3 ((unsigned) (XDP_USE_NEED_WAKEUP))
 #define XLAT_STR_3 STRINGIFY(XDP_USE_NEED_WAKEUP)
};
static
const struct xlat xdp_sockaddr_flags[1] = { {
 .data = xdp_sockaddr_flags_xdata,
 .size = ARRAY_SIZE(xdp_sockaddr_flags_xdata),
 .type = XT_NORMAL,
 .flags_mask = 0
#  ifdef XLAT_VAL_0
  | XLAT_VAL_0
#  endif
#  ifdef XLAT_VAL_1
  | XLAT_VAL_1
#  endif
#  ifdef XLAT_VAL_2
  | XLAT_VAL_2
#  endif
#  ifdef XLAT_VAL_3
  | XLAT_VAL_3
#  endif
  ,
 .flags_strsz = 0
#  ifdef XLAT_STR_0
  + sizeof(XLAT_STR_0)
#  endif
#  ifdef XLAT_STR_1
  + sizeof(XLAT_STR_1)
#  endif
#  ifdef XLAT_STR_2
  + sizeof(XLAT_STR_2)
#  endif
#  ifdef XLAT_STR_3
  + sizeof(XLAT_STR_3)
#  endif
  ,
} };
DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE

#  undef XLAT_STR_0
#  undef XLAT_VAL_0
#  undef XLAT_STR_1
#  undef XLAT_VAL_1
#  undef XLAT_STR_2
#  undef XLAT_VAL_2
#  undef XLAT_STR_3
#  undef XLAT_VAL_3
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */
